package com.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.domain.Video;
import com.dto.PageResult;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

public interface VideoService extends IService<Video> {

    @Transactional
    void addVideo(Video video);

    @Transactional(rollbackFor = Exception.class)
    Map<String, List<Video>> homeListVideo(String videoPartition);

    @Transactional(rollbackFor = Exception.class)
    PageResult<Video> pageListVideos(Video video);

    Video getVideoDetail(Long videoId, Long userId);
}
